package org.jsola.contract.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.contract.dto.CategoryVariableAddDTO;
import org.jsola.contract.dto.CategoryVariableUpdateDTO;
import org.jsola.contract.query.CategoryVariableQuery;
import org.jsola.contract.vo.CategoryVariableListVO;
import org.jsola.contract.vo.CategoryVariableVO;
import org.jsola.core.Page;
import org.jsola.core.Result;

import java.util.List;

/**
 * 合同分类下模板变量
 *
 * @author JanusMix
 */
@Api(tags = "contract-合同分类下模板变量")
public interface ICategoryVariableControllerAPI {

    /**
     * 新增合同分类下模板变量
     * @param categoryVariableAddDTO 合同分类下模板变量新增实体
     * @return 合同分类下模板变量展示对象
     */
    @ApiOperation(value = "新增合同分类下模板变量")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "categoryVariableAddDTO", dataType = "CategoryVariableAddDTO", value = "新增合同分类下模板变量", paramType = "body")
    })
    Result<CategoryVariableVO> save(CategoryVariableAddDTO categoryVariableAddDTO);


    /**
     * 修改合同分类下模板变量
     * @param categoryVariableUpdateDTO 合同分类下模板变量
     * @return 更新数量
     */
    @ApiOperation(value = "修改合同分类下模板变量")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "categoryVariableUpdateDTO", dataType = "CategoryVariableUpdateDTO", value = "修改合同分类下模板变量", paramType = "body")
    })
    Result<Integer> update(CategoryVariableUpdateDTO categoryVariableUpdateDTO);




    /**
     * 删除单个合同分类下模板变量，彻底删除
     * @param categoryVariableId 合同分类下模板变量id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个合同分类下模板变量，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "categoryVariableId", dataType = "Long", value = "合同分类下模板变量id", paramType = "path")
    })
    Result<Integer> delete(Long categoryVariableId);


    /**
     * 批量删除合同分类下模板变量，彻底删除
     * @param categoryVariableIds 合同分类下模板变量id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除合同分类下模板变量，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "categoryVariableIds", dataType = "Long[]", value = "合同分类下模板变量id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(Long[] categoryVariableIds);


    /**
     * 根据合同分类下模板变量id查询合同分类下模板变量详情
     * @param categoryVariableId 合同分类下模板变量id
     * @return 合同分类下模板变量详情
     */
    @ApiOperation(value="根据合同分类下模板变量id查询合同分类下模板变量详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "categoryVariableId", dataType = "Long", value = "合同分类下模板变量id", paramType = "path")
    })
    Result<CategoryVariableVO> findById(Long categoryVariableId);


    /**
     * 查询合同分类下模板变量
     * @param categoryVariableQuery 合同分类下模板变量查询参数
     * @return page
     */
    @ApiOperation(value="查询合同分类下模板变量")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "categoryVariableQuery", dataType = "CategoryVariableQuery", value = "合同分类下模板变量查询参数", paramType = "query")
    })
    Result<List<CategoryVariableListVO>> listAll(CategoryVariableQuery categoryVariableQuery);


     /**
     * 分页查询合同分类下模板变量
     * @param categoryVariableQuery 合同分类下模板变量查询参数
     * @return page
     */
    @ApiOperation(value="分页查询合同分类下模板变量")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "categoryVariableQuery", dataType = "CategoryVariableQuery", value = "合同分类下模板变量查询参数", paramType = "query")
    })
    Result<Page<CategoryVariableListVO>> page(CategoryVariableQuery categoryVariableQuery);


}

